<?php

class LogoutController extends ControllerBase
{
	public $defaultAction = 'logout';

	/**
	 * Logout the current user and redirect to returnLogoutUrl.
	 */
	public function actionLogout()
	{
		if (Util::isSuperMod())
			$url	= array('/user/login/admin');
		else
			$url	= array('/user/login');
		Yii::app()->user->logout();
		$this->redirect($url);
	}

}